from tensorflow.keras import datasets,losses,layers,metrics,Sequential,optimizers

class MyDense(layers.Layer):

    def __init__(self, input_dim, output_dim):
        super(MyDense, self).__init__()

        self.kernel = self.add_weight('w', [input_dim, output_dim])
        self.bias = self.add_weight('b', [output_dim])

    def call(self, inputs, training=None):

        out = inputs @ self.kernel + self.bias

        return out
